<template>
  <el-form
    ref="editForm"
    :model="form"
    label-width="250px"
    label-position="right"
    
    :disabled="loading"
    
  >

    <el-row>
      <el-col :span="12">
        <el-form-item prop="assetTagNumber" label="固定资产标签编号">
          <el-input
            :disabled="disable"
            style="width:100%"
            v-model="form.assetTagNumber"
            show-word-limit
            placeholder="固定资产标签编号"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="cloudCenterAssetTag" label="云中心资产标签">
          <el-input
            v-model="form.cloudCenterAssetTag"
            :disabled="disable"
            show-word-limit
            placeholder="云中心资产标签"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="noticeAssetNumber" label="固定资产增加通知单固定资产编号">
          <el-input
            :disabled="disable"
            v-model="form.noticeAssetNumber" show-word-limit placeholder="固定资产增加通知单固定资产编号"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="noticeNumber" label="固定资产增加通知单编号">
          <el-input v-model="form.noticeNumber"
                    :disabled="disable"
                    placeholder="固定资产增加通知单编号"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="sysCardNumber" label="固定资产管理系统卡片号">
          <el-input v-model="form.sysCardNumber"
                    :disabled="disable"
                    placeholder="固定资产管理系统卡片号"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="sysCardUniqueNumber" label="固定资产管理系统卡片唯一编号">
          <el-input v-model="form.sysCardUniqueNumber"
                    :disabled="disable"
                    placeholder="固定资产管理系统卡片唯一编号"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="sysDirectoryCode" label="固定资产管理系统目录代码">
          <el-input v-model="form.sysDirectoryCode"
                    :disabled="disable"
                    placeholder="固定资产管理系统目录代码"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="assetClassify" label="资产分类">
          <el-input :value="typeFormat(dict.type.fa_asset_classify, form.assetClassify)"
                    :disabled="disable"
                    placeholder="资产分类"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="classify" label="分类">
          <el-input :value="typeFormat(dict.type.fa_classify, form.classify)"
                    :disabled="disable"
                    placeholder="分类"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="deviceName" label="设备名称">
          <el-input v-model="form.deviceName"
                    :disabled="disable"
                    placeholder="设备名称"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="brand" label="品牌">
          <el-input v-model="form.brand"
                    :disabled="disable"
                    placeholder="品牌"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="deviceType" label="设备类型">
          <el-input :value="typeFormat(dict.type.fa_device_type, form.deviceType)"
                    :disabled="disable"
                    placeholder="设备类型"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="deviceSpec" label="设备规格">
          <el-input v-model="form.deviceSpec"
                    :disabled="disable"
                    placeholder="设备规格"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="serialNumber" label="序列号">
          <el-input v-model="form.serialNumber"
                    :disabled="disable"
                    placeholder="序列号"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="quantity" label="数量">
          <el-input v-model="form.quantity"
                    :disabled="disable"
                    placeholder="数量"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="unit" label="单位">
          <el-input v-model="form.unit"
                    :disabled="disable"
                    placeholder="单位"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="amount" label="金额">
          <el-input v-model="form.amount"
                    :disabled="disable"
                    placeholder="金额"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="importance" label="重要程度">
          <el-input v-model="form.importance"
                    :disabled="disable"
                    placeholder="重要程度"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="12">
        <el-form-item prop="detailedAccountVoucherNumber" label="固定资产明细账凭单号">
          <el-input v-model="form.detailedAccountVoucherNumber"
                    :disabled="disable"
                    placeholder="固定资产明细账凭单号"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="peopleUse" label="使用人">
          <el-input v-model="form.peopleUse"
                    :disabled="disable"
                    placeholder="使用人"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="12">
        <el-form-item prop="preserver" label="保管人">
          <el-input v-model="form.preserver"
                    :disabled="disable"
                    placeholder="保管人"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="claimingDate" label="领用日期">
          <el-date-picker v-model="form.claimingDate"
                          :disabled="disable"
                          style="width:100%" placeholder="领用日期" value-format="yyyy-MM-dd"
          ></el-date-picker>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="officeSpace" label="办公场所">
          <el-input v-model="form.officeSpace"
                    :disabled="disable"
                    placeholder="办公场所"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="storageArea" label="存放区域">
          <el-input v-model="form.storageArea"
                    :disabled="disable"
                    placeholder="存放区域"
          ></el-input>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">

        <el-form-item prop="detailedLocation" label="详细位置">
          <el-input v-model="form.detailedLocation"
                    :disabled="disable"
                    placeholder="详细位置"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="source" label="来源">
          <el-input v-model="form.source"
                    :disabled="disable"
                    placeholder="来源"
          ></el-input>
        </el-form-item>

      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="organizationalPurchasingForm" label="组织采购形式">
          <el-input :value="typeFormat(dict.type.fa_organizational_purchasing_form, form.organizationalPurchasingForm)"
                    :disabled="disable"
                    placeholder="组织采购形式"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="originalOwner" label="原领用人">
          <el-input v-model="form.originalOwner"
                    :disabled="disable"
                    placeholder="原领用人"
          ></el-input>
        </el-form-item>

      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="discRepletion" label="盘实">
          <el-input v-model="form.discRepletion"
                    :disabled="disable"
                    placeholder="盘实"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="tag" label="标签">
          <el-input v-model="form.tag"
                    :disabled="disable"
                    placeholder="标签"
          ></el-input>
        </el-form-item>

      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="status" label="设备状态">
          <el-input :value="typeFormat(dict.type.fa_status, form.status)"
                    :disabled="disable"
                    placeholder="设备状态"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="retirementLife" label="报废年限">
          <el-input v-model="form.retirementLife"
                    :disabled="disable"
                    placeholder="报废年限"
          ></el-input>
        </el-form-item>

      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="disposalScheme" label="处置方案">
          <el-input :value="typeFormat(dict.type.fa_disposal_scheme, form.disposalScheme)"
                    :disabled="disable"
                    placeholder="处置方案"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="department" label="所属部门">
          <el-input v-model="form.department"
                    :disabled="disable"
                    placeholder="所属部门"
          ></el-input>
        </el-form-item>

      </el-col>
    </el-row>

    <el-row>
      <el-col :span="12">
        <el-form-item prop="disposalPriority" label="处置优先级">
          <el-input :value="typeFormat(dict.type.fa_disposal_priority, form.disposalPriority)"
                    :disabled="disable"
                    placeholder="处置优先级"
          ></el-input>
        </el-form-item>

        <el-form-item prop="retirementStatus" label="报废状态">
          <el-input :value="typeFormat(dict.type.fa_retirement_status, form.retirementStatus)"
                    :disabled="disable"
                    placeholder="报废状态"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item prop="retirementDate" label="报废日期">
          <el-date-picker v-model="form.retirementDate"
                          :disabled="disable"
                          style="width:100%" placeholder="报废日期" value-format="yyyy-MM-dd"
          ></el-date-picker>
        </el-form-item>


      </el-col>
    </el-row>
    <el-alert
      title="注：以上信息不可修改"
      type="success"
      :closable="false"
    >
    </el-alert>
  </el-form>


</template>


<script>

export default {
  dicts: ['fa_device_type', 'fa_asset_classify', 'fa_classify', 'fa_organizational_purchasing_form', 'fa_status', 'fa_disposal_scheme', 'fa_disposal_priority', 'fa_retirement_status'],
  props: {
    form: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      loading: false,
      disable: true
    }
  },
  methods: {
    typeFormat(dict, column) {
      return this.selectDictLabel(dict, column)
    },
    handleCancel() {
      this.visible = false
      this.loading = false
    }
  }
}
</script>

<style lang="scss">
el-dialog {
  background: #ffffff;
  border: 1px solid #ffffff;
}

</style>
